import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '@/views/login'
import layout from '@/views/layout'
import desk from '@/views/desk'
import warehousemanage from '@/views/messagemanage/Warehouse-manage'
import reservoirarea from '@/views/messagemanage/Reservoir-area'
import goodsmanage from '@/views/messagemanage/goods-manage'
import typemanage from '@/views/messagemanage/type-manage'
import add from '@/views/messagemanage/addhouse'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: login
  },
  {
    path:'/layout',
    name:'layout',
    component: layout,
    redirect:'/desk',
    children:[
      {
        path:'/desk',
        name:'desk',
        component:desk,
      },
      {
        path:'/warehousemanage',
        name:'warehousemanage',
        component:warehousemanage,
      },
      {
        path:'/reservoirarea',
        name:'reservoirarea',
        component:reservoirarea,
      },
      {
        path:'/goodsmanage',
        name:'goodsmanage',
        component:goodsmanage,
      },
      {
        path:'/typemanage',
        name:'typemanage',
        component:typemanage,
      },
      {
        path:'/add',
        name:'add',
        component:add,
      },
    ]
  }

]

const router = new VueRouter({
  routes
})

export default router
